#include <stdio.h>
#include <stdbool.h>
#include <ctype.h>
#include <string.h>
bool isPalindrome(char *s) {
    int len = strlen(s);
    int left = 0;
    int right = len - 1;
    while (left < right) {
        // 跳过非字母数字字符
        while (left < right && !isalnum(s[left])) {
            left++;
        }
        while (left < right && !isalnum(s[right])) {
            right--;
        }
        // 将字符转换为小写进行比较
        if (tolower(s[left]) != tolower(s[right])) {
            return false;
        }
        left++;
        right--;
    }
    return true;
}
int main() {
    char s[] = "A man, a plan, a canal: Panama";
    bool result = isPalindrome(s);
    printf("%s\n", result ? "true" : "false");
    return 0;
}